<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="/fuman/js/order.js"></script>
<script>
	function addorder()
	{
		$('#addstorageform').modal('show');
	}
	function Dodistribution()
	{
		var str = selectallpro();
		if(str !=false)
		{
			$.post("/deliverorder/ajaxbutton", {"op": "dodistribution","str":str},
					function(data){
						//alert(data);return false;
						if(data==200)
						{
							document.location.href = '/deliverorder/emsexpress/13';
						}
					},"json");
		}
	}
	function delone(id,t)
	{
		if(confirm("确定移除?"))
		{
			$.post("/deliverorder/ajaxbutton", {"op": "delone","id":id,"st":t},
					function(data){
						if(data.txt==200)
						{
							//document.location.href = data.url;
							location.reload();
							return;
						}
						if(data.txt==201)
						{
							alert(data.text);
							return ;
						}

						return;
					},"json");
		}
	}
	function showExpressForm(type){
		var submit_act = new Array();
		submit_act['yanwen'] = "/deliverorder/ajaxbutton?op=yanwenexpress";
		$("#expressOrderForm").attr("action", submit_act[type]);
		$("#type").val(type);
		if(type=='yanwen')
		{
			$("#showmabang").show();
		}
		$('#expressform').modal('show');
	}
</script>
<title>欧速通交运列表</title>
<body class="withvernav">
<div class="bodywrapper"> {{include file='/public/leftmenu.tpl'}}
	<div class="centercontent">
		<div class="pageheader notab">
			<h1 class="pagetitle">欧速通交运列表</h1>
			<span class="pagedesc"></span>
			<div class="menulist">
				<ul class="profile_summary">
					<li><a href="/deliverorder/ajaxbutton?op=ostexpress"  target="_blank"><span>批量交运欧速通</span></a></li>
				</ul>
			</div>
		</div>
		<!--pageheader-->

		<div id="contentwrapper" class="contentwrapper">
			<div id="basicform" class="subcontent">
				<!--搜索栏-->
				<div class="page">{{$pageList}} 计{{$total}}条记录，共{{$totalpage}}页</div>
				<form class="stdform stdform2" method="get" action="/deliverorder/emsExpress/13">
					<input type="hidden" name="orderType" id="orderType" value="{{$orderType}}" >
					<div class="tableoptions"> 交运时间：
						<input type="text"  name="starttime" value="{{$starttime}} " onClick="WdatePicker({dateFmt:'yyyy-MM-dd '})" class="width100 hasDatepicker" /> - <input type="text"  name="endtime" value="{{$endtime}} " onClick="WdatePicker({dateFmt:'yyyy-MM-dd '})" class="width100 hasDatepicker" />
						关键词: <input type="text" name="other" id="other" class="width100" value="{{$other}}" placeholder="订单号或运单号" />
						&nbsp;
						订单状态:
						<select name="statusst" class="selection" style="width:100px;">
							<option value=""  selected>请选择</option>
							<option value="1" {{if $statusst==1}} selected{{/if}}>已支付</option>
							<option value="2" {{if $statusst==2}} selected{{/if}}>配货中</option>
							<option value="3" {{if $statusst==3}} selected{{/if}}>已完成</option>
						</select>
						发货方式:
						<select name="deliver" class="selection" style="width:100px;">
							<option value=""  selected>请选择</option>
							<option value="英伦速邮（普货）" {{if $deliver=="英伦速邮（普货）"}} selected{{/if}}>英伦速邮（普货）</option>
							<option value="英伦速邮全追踪（普货）" {{if $deliver=="英伦速邮全追踪（普货）"}} selected{{/if}}>英伦速邮全追踪（普货）</option>
						</select>
						&nbsp;
						<button class="btn btn_orange btn_search radius50">Search</button>
						&nbsp;  &nbsp;
						<a href="?isexe=1">{{if $isexe==1}}<font color="red">交运成功</font>{{else}}交运成功{{/if}}</a>
						&nbsp;  &nbsp;
						<a href="?isexe=2">{{if $isexe==2}}<font color="red">交运失败</font>{{else}}交运失败{{/if}}</a>
						&nbsp;  &nbsp;
						<a href="?isexe=3">{{if $isexe==3}}<font color="red">未交运</font>{{else}}未交运{{/if}}</a>
						&nbsp;  &nbsp;&nbsp;  &nbsp;&nbsp;  &nbsp;
						<a href="javascript:void(0)" onClick="moreopenMailNoUrl(1,7)" class="btn btn2 btn_help"><span>打印标签</span></a>
						&nbsp;&nbsp;
						<a href="javascript:void(0)" onClick="Dodistribution()" class="btn btn2 btn_help"><span>标配货</span></a>
						&nbsp;&nbsp; &nbsp;&nbsp;
						<a href="javascript:void(0)" onClick="repeatexpress(13)" class="btn btn2 btn_help"><span>重新交运</span></a>
					</div>
				</form>
				<!--搜索栏结束-->

				<table cellpadding="0" cellspacing="0" border="0" class="stdtable">

					<thead>
					<tr>
						<th class="head0"><input name="allchk" id="allchk" type="checkbox" onClick="allSelect('ppid[]')"></th>
						<th class="head1">订单号</th>
						<th class="head1">状态</th>
						<th class="head1">客户名称</th>
						<th class="head1">来源平台</th>
						<th class="head1">国家</th>
						<th class="head1">操作人</th>
						<th class="head1">状态</th>
						<th class="head1">运单号</th>
						<th class="head1">交运时间</th>
						<th class="head1">发货方式</th>
						<th class="head1">操作</th>

					</tr>
					</thead>

					{{foreach from=$orderlist item=detail key=key}}
					<tr>
						<td><input name="ppid[]" type="checkbox" value="{{$detail.id}}"></td>
						<td>
							{{if $detail.isform eq 0}}
							<a href="/orderlist/orderlist?kw={{$detail.orderID}}" target="_blank">{{$detail.orderID}}</a>
							{{else}}
							<a href="http://192.168.1.100:89/eshop/order.do?method=edit&orderid={{$detail.orderID}}" target="_blank">{{$detail.orderID}}</a>
							{{/if}}
						</td>
						<td>{{$detail.statusst}}</td>
						<td>{{$detail.customerid}}</td>
						<td>{{$detail.customertype}}</td>
						<td>{{$detail.customerqq}}</td>
						<td>{{$detail.createUser}}</td>
						<td>{{if $detail.isexe==1}}交运完成{{/if}}{{if $detail.isexe==2}}<span style="color:red;">交运失败</span> {{/if}}{{if $detail.isexe==0}}未交运{{/if}}</td>
						<td>{{if $detail.isexe==1}}{{$detail.mailNo}}{{/if}}{{if $detail.isexe==2}}{{$detail.exememo}}{{/if}}{{if $detail.isexe==0}}{{$detail.exememo}}{{/if}}</td>
						<td>{{$detail.mailinstime}}</td>
						<td>{{$detail.deliver}}</td>
						<td> {{if $detail.isexe==2}}<a href="javascript:void(0)" onClick="delone({{$detail.id}},'delostexpress')">删除</a>{{/if}}  {{if $detail.isexe==0}}<a href="javascript:void(0)" onClick="delone({{$detail.id}},'delostexpress')" >删除</a>{{/if}}

							{{if $managers || in_array('101',$showpower)}}{{if $detail.isexe==1}}<!--<a href="javascript:void(0)" onClick="delone({{$detail.id}},'delyanwenexpress')" >删除</a> |--> {{/if}}{{/if}}
							{{if $detail.isexe==1}}<!--<a href="{{$detail.printUrl}}" target="_blank">标签A</a>&nbsp;&nbsp;|&nbsp;&nbsp;--><a href="/{{$detail.printUrl}}" target="_blank">pdf</a>&nbsp;&nbsp;|&nbsp;&nbsp;
							<!-- <a href="/{{$detail.printUrl}}"  target="_blank">标签</a>-->
							<a href="/order/ajaxbutton?op=sfexpressurl&orderType=7&id={{$detail.id}}," target="_blank">标签</a>
							{{/if}}</td>
					</tr>
					{{/foreach}}



				</table>

				<div class="page">{{$pageList}} 计{{$total}}条记录，共{{$totalpage}}页</div>
			</div></div>
		<!-- 模态框（Modal）添加商品属性 -->
		<form action="/datareport/ajaxbutton?op=savemabangorder"  method="post" name="attributeform" id="attributeform" >
			<div class="modal fade" id="addstorageform" tabindex="-1" role="dialog" aria-labelledby="returnaddattributeform" aria-hidden="true">
				<div class="modal-dialog" style="width:740px;">
					<div class="modal-content">
						<div class="modal-header">
							<button type="button" class="close" data-dismiss="modal"
							        aria-hidden="true">× </button>
							<h4 class="modal-title" id="returnaddattributeform"> 添加燕文订单 </h4>
						</div>
						<div class="modal-body">
							<table width="100%" border="0" cellspacing="0" cellpadding="0">
								<tr>
									<td width="100">燕文订单号： </td>
									<td align="left"><textarea name="orderlist" id="orderlistst" cols="10" rows="10"></textarea></td>
								</tr>
								<tr>
									<td>注意： </td>
									<td align="left">一行一个订单号</td>
								</tr>
							</table>
							<div class="modal-footer">
								<button type="button" class="btn btn-default"
								        data-dismiss="modal"> 关闭 </button>
								<button type="button" class="btn btn-primary"  onclick="AWSsubmit('attributeform','addstorageform')"> 提交 </button>
							</div>
						</div>
						<!-- /.modal-content -->
					</div>
					<!-- /.modal-dialog -->
				</div>
			</div>
			<!-- /.modal -->
		</form>
		<!--马帮未交运完订单-->
		<!--CNE,UBI,DHL交运表单-->
		<form action="/deliverorder/yanwenexpress"  method="post" name="expressOrderForm" id="expressOrderForm" target="_blank">
			<input type="hidden" name="type" id="type">
			<input type="hidden" name="course" value="express_send">
			<div class="modal fade" id="expressform" tabindex="-1" role="dialog" aria-labelledby="expressform" aria-hidden="true">
				<div class="modal-dialog" style="width:740px;">
					<div class="modal-content">
						<div class="modal-header">
							<button type="button" class="close" data-dismiss="modal"
							        aria-hidden="true">× </button>
							<h4 class="modal-title" id="sprintform"> 待交运订单编号  </h4>
						</div>
						<div class="modal-body">
							<table width="100%" border="0" cellspacing="0" cellpadding="0">
								<tr>
									<td width="100">订单号： </td>
									<td align="left"><textarea name="orderlist" id="orderlistst" cols="10" rows="10"></textarea></td>
								</tr>

								<tr id="showmabang" style="display:none">
									<td>交运马帮订单： </td>
									<td align="left" style="color:#999"><input name="isformMabang" type="checkbox" value="1"> 上面填写订单号为马帮订单号时，这里打勾</td>
								</tr>
								<tr>
									<td>发货方式</td>
									<td>
										<select name="deliver" id="deliver">
											<!--  <option value="燕文美国专线">燕文美国专线</option> -->
											<option value="中邮上海挂号小包">中邮上海挂号小包</option>
											<option value="中邮上海平邮小包">中邮上海平邮小包</option>
										</select>
									</td>
								</tr>
								<tr>
									<td>注意： </td>
									<td align="left" style="color:#999">一行一个订单号</td>
								</tr>
							</table>
							<div class="modal-footer">
								<button type="submit" class="btn btn-primary"> 提交 </button>
								<button type="button" class="btn btn-default"
								        data-dismiss="modal" style="display:none"> 关闭 </button>
							</div>
						</div>
						<!-- /.modal-content -->
					</div>
					<!-- /.modal-dialog -->
				</div>
			</div>
		</form>
</body>
<div id="goToTop" style="display:none"><a href="javascript:;">TOP</a></div>
</html>